Apparatus and method for determining user&#39;s mental state

ABSTRACT

An apparatus for determining a user&#39;s mental state in a terminal is provided. The apparatus includes a data collector configured to collect sensor data; a data processor configured to extract feature data from the sensor data; and a mental state determiner configured to provide the feature data to an inference model to determine the user&#39;s mental state.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 U.S.C. §119(a) of KoreanPatent Application No. 10-2012-0126804, filed on Nov. 9, 2012 in theKorean Intellectual Property Office, the entire disclosure of which isincorporated herein by reference for all purposes.

BACKGROUND

1. Field

The following description relates to an apparatus and method fordetermining a user's mental state.

2. Description of the Related Art

Terminals, such as smart phones and tablet personal computers (PCs),provide various functions based on hardware and software performance.Context-aware services that recognize a user's context and provide afunction suitable to the context are being actively attempted. Examplesof such services are services that are provided using locationinformation of a user, for example, services that automatically providean available coupon when a user goes in front of a restaurant. Infuture, intelligent service based on more significant user information,such as, for example, a user's mental state may be provided.

However, technology for recognizing a user's mental states mainlyanalyzes a user's physical reaction, such as technology that analyzes auser's facial image to map a motion of a specific facial muscle to aspecific emotion, or technology that analyzes a voice feature of a userto map the voice feature to a specific emotion, or technology thatanalyzes a bio-signal feature of a user to map the bio-signal feature toa specific emotion. In such emotion-recognition technology that analysesa user's physical reaction, it is not easy to determine the user'semotion when a user deliberately conceals a physical reaction(non-expression, etc). Thus, a separate sensor (skin response sensor orthe like) is attached to a body for measuring a physical reaction, whichinconveniences the user. For these reasons, the use of emotionrecognition technology is restricted.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

In one general aspect, an apparatus for determining a user's mentalstate including a data collector configured to collect sensor data; adata processor configured to extract feature data from the sensor data;and a mental state determiner configured to apply the feature data to ainference model to determine the user's mental state.

The sensor data may be measured through one or more of a touch screen,an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, anorientation sensor, a global positioning system (GPS), a barometersensor, a fingerprint sensor, an illuminance sensor, a microphone, and asoftware sensor in a terminal.

The feature data includes text input information and contextinformation; and the text input information comprises one or more ofkeyboard input information, writing input information, and terminalstate information, and the context information comprises one or more ofa location, weather, a discomfort index, a time, and an averageilluminance.

The apparatus may include a learning data generator configured todetermine whether to generate learning data when feature data isextracted and to generate learning data with the feature data; and themental state determiner is further configured to build the inferencemodel with the learning data.

The learning data generator may be configured to select at least onefeature data from the extracted feature data, to ask the user about amental state, and to generate learning data based on the user'sresponse.

The learning data generator may be configured to calculate significancesof the extracted feature data and to select the at least one featuredata on the basis of the significances.

The significances of the extracted feature data may be calculated usingalgorithms comprising an information gain algorithm, a chi-squareddistribution algorithm, and a mutual information algorithm.

The apparatus may include a learning database configured to store thelearning data.

The mental state may include at least one of an emotion, a feeling, or astress, and each mental state comprises one or more lower levels.

The mental state determiner is further configured to apply the featuredata to the inference model with a supervised learning algorithm, thesupervised learning algorithm comprising a decision tree algorithm and anaive Bayes classification algorithm.

The apparatus may include a measure executor configured to take apredetermined measures based on the determined mental state.

The predetermined measure may include providing information on thedetermined mental state of the user, controlling a user interface of theterminal based on the user's mental state, recommending content based onthe mental state of the user, and updating learning data with the mentalstate of the user.

The apparatus may include a measure database configured to store thepredetermined measures.

The measure executor may be installed as an interactive software agentthat is configured to provide a conversational interface.

The apparatus may include an authenticator configured to authenticatethe user at the terminal.

The user may be authenticated based on at least one of logoninformation, fingerprint, or biometric information.

In another general aspect, a method of determining a user's mentalstate, including: collecting sensor data which are generated when a userinputs text using a terminal; extracting, at a data processor, featuredata from the sensor data; and applying the feature data to a builtinference model to determine the user's mental state.

The sensor data may be measured through one or more of a touch screen,an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, anorientation sensor, a global positioning system (GPS), a barometersensor, a fingerprint sensor, an illuminance sensor, a microphone, and asoftware sensor.

The feature data may include text input information and contextinformation; and the text input information comprises one or more ofkeyboard input information, writing input information, and terminalstate information, and the context information comprises one or more ofa location, weather, a discomfort index, a time, information onrecipient of the text, and an average illuminance.

The method of determining a user's mental state may include determining,when feature data is extracted, whether to generate learning data;generating learning data with the feature data when learning data is tobe generated; and building the inference model with the learning data.

The generating of learning data may include selecting at least onefeature data from the extracted feature data; asking the user about amental state; and generating learning data on the basis of the user'sresponse.

The selecting of at least one feature data may include calculatingsignificances of the extracted feature data, and selecting the at leastone feature data on the basis of the significances.

The significances of the extracted feature data may be calculated usingalgorithms comprising an information gain algorithm, a chi-squareddistribution algorithm, and a mutual information algorithm.

The mental state may include at least one of an emotion, a feeling, or astress, and each mental stats comprises one or more lower levels.

The determining of the user's mental state may include applying thefeature data to the inference model with a supervised learningalgorithm, the supervised learning algorithm comprising a decision treealgorithm and a naive Bayes classification algorithm.

The method may include undertaking a predetermined measure based on thedetermined mental state.

The predetermined measure may include providing information on thedetermined mental state, controlling a user interface of the terminal onthe basis of the mental state, recommending content based on the mentalstate of the user, and updating learning data with the determined resultof the mental state.

In another general aspect, a method of determining a user's mentalstate, including: extracting a speed at which a user inputs text to aterminal; applying the text input speed to an inference model todetermine the user's mental state; and taking a predetermined measure onthe basis of the determined mental state.

The method may include extracting other information, which is generatedwhen the user is inputting the text and applying the other informationto the inference model.

The other information may include location information of the terminal.

The other information may include weather information.

The other information may include state information of the terminal.

The other information may include number of shakings of the terminal.

In another general aspect, a method of determining a user's mentalstate, including: collecting sensor data which are generated when a userinputs text using a terminal; extracting, at a data processor, featuredata from the sensor data; determining whether learning data is to begenerated; and applying the feature data to a built inference model todetermine the user's mental state.

Determining whether learning data is to be generated may includeverifying whether a first predetermined reference is satisfied orreceiving a request from the user to generate the learning data.

The method may include when learning data is to be generated, generatinglearning data with the feature data; confirming whether the learningdata exceeds a second predetermined reference; and building theinference model with the learning data when the learning data exceedsthe second predetermined reference.

The method may include updating the inference model with the user'sresponse on the determined mental state.

Other features and aspects will be apparent from the following detaileddescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an apparatus for determining a user'smental state.

FIG. 2 is a diagram illustrating examples of feature data.

FIGS. 3A and 3B are diagrams illustrating examples of mental statedetermination result using the feature data.

FIG. 4 is diagram illustrating an example of a query for generatinglearning data.

FIG. 5 is a diagram illustrating a method of determining a user's mentalstate.

FIG. 6 is a diagram illustrating a method of determining a user's mentalstate.

Throughout the drawings and the detailed description, unless otherwisedescribed, the same drawing reference numerals will be understood torefer to the same elements, features, and structures. The relative sizeand depiction of these elements may be exaggerated for clarity,illustration, and convenience.

DETAILED DESCRIPTION

The following description is provided to assist the reader in gaining acomprehensive understanding of the methods, apparatuses, and/or systemsdescribed herein. Accordingly, various changes, modifications, andequivalents of the methods, apparatuses, and/or systems described hereinwill be apparent to one of ordinary skill in the art. Also, descriptionsof well-known functions and constructions may be omitted for increasedclarity and conciseness.

FIG. 1 is a diagram illustrating an apparatus for determining a user'smental state. Referring to FIG. 1, an apparatus 100 for determining auser's mental state includes a data collector 110, a data processor 120,a mental state determiner 150, and a measure executor 160.

The data collector 110 collects sensor data that are generated when auser inputs text using a terminal. As a non-exhaustive illustrationonly, a terminal/device/mobile terminal described herein may refer tomobile devices such as, for example, a cellular phone, a smart phone, awearable smart device (such as, for example, a watch, a glass, or thelike), a tablet personal computer (PC), a personal digital assistant(PDA), a digital camera, a portable game console, and an MP3 player, aportable/personal multimedia player (PMP), a portable game console, ahandheld e-book, an ultra mobile personal computer (UMPC), a portablelab-top PC, a global positioning system (GPS) navigation, and devicessuch as a desktop PC, a high definition television (HDTV), an opticaldisc player, a setup box, and the like capable of wireless communicationor network communication consistent with that disclosed herein.

The user may use the terminal to perform various tasks, such as, forexample checking email, social network service (SNS) activity, Internetbrowsing, shopping, navigation, playing games, and using mobilemessenger. When the user performs these tasks, many different types ofdata may be generated from various sensors built in the terminal. Thesesensors may include, but are not limited to, a touch screen, anaccelerometer sensor, a gyroscope sensor, a magnetometer sensor, anorientation sensor, a global positioning system (GPS), a fingerprintsensor, a barometer sensor, an illuminance sensor, a microphone, asoftware sensor, etc. The data collector 110 collects data generatedfrom the various sensors.

The data processor 120 extracts feature data, used for analyzing theuser's mental state, from the collected sensor data. When the userinputs text using a keyboard, a touch screen, a stylus pen, or the like,the input may include various habits or features associated with theuser's mental state. The data processor 120 may extract information fromthe sensor data on the user's text input habit, which may unconsciouslychange depending on the user's mental state. The data processor 120 mayalso extract information on the ambient context of the user as featuredata because the user's mental state may be changed depending on theambient context when inputting text. The examples described above areonly non-exhaustive illustration of feature data, and all data thatreflects the user's mental state may be used as feature data.

FIG. 2 is a diagram illustrating some examples of feature data.Referring to FIGS. 1 and 2, the data processor 120 may extract one ormore of keyboard input information, writing input information, andterminal state information as feature data (i.e., feature information)from among sensor data that are continuously collected when the user iscomposing a text message, for example. The keyboard input information isdata that are generated when inputting text through a keyboard of theterminal. As illustrated in FIG. 2, the keyboard input data may include,but is not limited to, typing speed, length of the longest text, lengthof the shortest and longest deleted text, number of words typed perediting, number of long touches per editing, frequency of use ofbackspace key, frequency of use of enter key, frequency of use ofspecial sign, etc. The writing input information is data generated wheninputting text with a writing instrument, such as, for example, astylus, pen, or the like. As illustrated in FIG. 2, the writing inputinformation may include, but is not limited to, writing input speed,average writing pressure, average character size, average straightness(or curvature) of a character stroke, average character interval,average row interval, writing input regularity, etc. As illustrated inFIG. 2, the terminal state information may include, but is not limitedto, number of shakings of a device, average degree of inclination of thedevice, average remaining capacity of a battery, average voice volume,etc.

As another example, the data processor 120 may extract contextinformation, which is collected once or more while inputting text asfeature data. As illustrated in FIG. 2, the context information mayinclude, but is not limited to, location, weather, discomfort index,time, average illuminance, information regarding the recipient of themessage that is being typed, etc. An example of the discomfort index maybe the temperature-humidity index (THI), and the THI may exhibit thediscomfort of people according to temperature and humidity in empiricalfashion into numbers. The discomfort index may be calculated using, forexample, Equation 1.

Discomfort index is equal to (dry-bulb temperature+wet-bulbtemperature)×0.72+15, when using Fahrenheit's temperature scale andDiscomfort index is equal to (dry-bulb temperature+wet-bulbtemperature)×0.72+40.6, when using Celsius temperature scale.  Equation1

Some context information, such as, for example, location, weather, anddiscomfort index may be extracted once or more according to apredetermined schedule or reference. An example of collecting contextinformation according to a predetermined reference is when the usermoves while inputting text, the context information may be extractedwhenever the user moves a certain distance, for example 10 m. Anotherexample of collecting context information according to a predeterminedreference is extracting the context information whenever a certain time(for example 1 min) elapses. The message recipient's information mayreveal that the number or frequency of transmissions of a message to aspecific receiving user changes depending on the user's mental state.

The mental state determiner 150 may apply the extracted feature data toan inference model to determine the user's mental state. The mentalstate determiner 150 may build the inference model with pre-generatedlearning data, and apply the feature data to the built inference modelto determine the user's mental state. The mental state determiner 150may apply the feature data to the inference model with one of supervisedlearning algorithms to determine the user's mental state. The supervisedlearning algorithms may include, but are not limited to, a decision treealgorithm, a naive Bayes classification algorithm, etc.

FIGS. 3A and 3B are diagrams illustrating examples of mental statedetermination result using feature data. Referring to FIGS. 1, 3A and3B, the mental state determiner 150 may classify the user's mental statewith feature data. As illustrated in FIGS. 3A and 3B, the mental statemay include one or more of an emotion, a feeling, and a stress, each ofwhich may be classified into various lower levels. For example, emotionmay be classified into happiness, pleasure, sorrow, fright, etc.;feeling may be classified into good, normal, depressing, etc.; and thestress may be classified into high, medium, and low. In addition, asshown in FIG. 3A, a confidence level or probability of accurateclassification may be attributed to the mental state or the emotion. Themental state determiner 150, as illustrated in FIG. 3A, may determine amental state with the feature data. Alternatively, as illustrated aportion FIG. 3B, the mental state determiner 150 may determine two ormore mental states.

As illustrated in the example of FIG. 3A, when typing speed using akeyboard is 23 characters per minute, the frequency of use of thebackspace key is three times while writing a message, the frequency ofuse of a special sign is five times, the number of shakings of a deviceis 10, an average illuminance is 150 Lux, and a numerical value of aspecific location (for example, road) is 3, an emotion state classifiedby applying the feature data to the inference model is “fright,” with aconfidence level of 74%. As illustrated in the example of FIG. 3B, anemotion state among mental states may be determined using writing inputinformation such as writing speed, average writing pressure, writinginput regularity, etc. which are extracted when inputting text with awriting instrument. Stress may be determined using terminal stateinformation such as average remaining capacity of a battery, averagevoice volume, etc.

Referring again to FIG. 1, the apparatus 100 for determining a user'smental state may include a learning data generator 130 and a learningdata database (DB) 140. When feature data are extracted, the learningdata generator 130 may determine whether to generate learning data. Thelearning data generator 130 may ask the user whether to generate thelearning data and when the user requests generation of the learning datain response to the query, or when a predetermined reference (forexample, when the number of stored learning data is equal to or lessthan a certain value) is satisfied, the learning data generator 130 maygenerate learning data. When it is determined that learning data is tobe generated, the learning data generator 130 may generate the learningdata with the feature data.

FIG. 4 is a diagram illustrating an example of a query for generatinglearning data. Referring to FIGS. 1 and 4, when generating learningdata, the learning data generator 130 may select at least some featuredata from the extracted feature data, ask the user about a mental statefor the selected feature data, and generate the learning data on thebasis of the user's response.

The learning data generator 130 may first select feature data, which areneeded to build an inference model, from among the extracted featuredata. The learning data generator 130 may remove noise from theextracted feature data. For example, when most numerical values of theextracted feature data are 0 or null, the learning data generator 130may determine corresponding feature data as a noise. As another example,when a change (for example, standard deviation) in feature data is lessthan a predetermined threshold value, the learning data generator 130may determine corresponding feature data as noise. When the form offeature data is not an arbitrary number but is nominal, the learningdata generator 130 may change corresponding feature data to an arbitrarynumber and use the changed number. For example, feature data may bechanged to 1 when a current location is a house, feature data may bechanged to 2 when a current location is a company, and feature data maybe changed to 3 when a current location is a road.

The learning data generator 130 may select some feature data that arehigh in significance from feature data from which a noise has beenremoved. The learning data generator 130 may calculate the significanceof the extracted feature data using a feature selection algorithm suchas, for example, an information gain algorithm, a chi-squareddistribution algorithm, or a mutual information algorithm. The learningdata generator may select some feature data having a high significancebased on the calculated significances.

When some feature data has been selected, as illustrated in FIG. 4, thelearning data generator 130 may ask the user about a mental state. Whenthe user selects the mental state, the learning data generator 130 mayindex-process the mental state in the feature data to generate learningdata and may store the learning data in the learning data DB 140. Asillustrated in FIG. 4, when the user writes a message of “It is a niceday today!,” the terminal displays a plurality of emoticons enablingselection of a current emotion state. The learning data generator 130may index-process an emotion state corresponding to an emoticon selectedby the user to generate learning data.

The learning data generator 130 may provide an emoticon corresponding toa mental state through the terminal to enable the user to easily inputthe mental state. The learning data generator 130 may also provide atext input window to enable the user to input its mental state as text.The learning data generator 130 may inquire about a mental state in manydifferent circumstances, such as, for example, immediately after theuser inputs text using the terminal, when the user stops movement for amoment, and while writing a message when inputting a plurality ofmessages.

The mental state determiner 150 may build an inference model with thelearning data that is generated by the learning data generator 130 andstored in the learning data DB 140. When the mental state determiner 150determines a mental state, the measure executor 160 may take anappropriate measure depending on the mental state. The measure executor160 may provide, for example, information on the determined mental stateor may control a user interface of the terminal based on the determinedmental state. For example, the measure executor 160 may inform the user,an acquaintance, a medical team, or the like of the user's currentmental state. As another example, the measure executor 160 may providestatistic information on accumulated mental states by graphicallydisplaying the number of times, the time zones, the places where theuser felt happy during the past month or during some other time period.

The measure executor 160 may automatically record the user's mentalstate when the user was writing a text message, an email, or an SNSpost, and may appropriately process and provide information on theuser's mental state. The measure executor 160 may automatically changethe theme of the terminal's user interface, such as, for example, font,color, background, brightness depending on a user's mental state. Themeasure executor 160 may also recommend content, such as, for example,music, game, movie, which are appropriate for the user's mental state.As another example, when the user's is feeling sorrow, the measureexecutor 160 may display a message appropriate for the user's currentmental state, such as, for example, “Everything depends on the mind.Cheer up!” When such a measure executor 160 is installed as aninteractive software agent, it is possible to attempt a conversation inappropriate response to the user's mental state.

When the determination of a user's mental state is correct, the measureexecutor 160 may index-process the determined mental state and theassociated extracted feature data to update the learning data. Theapparatus 100 for determining a user's mental state may further includea measure DB 170, which may store information on various measures to beexecuted when a mental state is determined. For example, the measure DB170 may store information on a method of configuring a user interfaceappropriate for a mental state, a list of recommendation contents bymental state, a response message, etc.

The apparatus 100 for determining a user's mental state may furtherinclude a user authenticator (not shown). The user authenticator (notshown) may authenticate a user through login, biometrics, or facerecognition. The learning data may be generated for each user, and aninference model may be built for each user, even when a plurality ofusers use one terminal. Thus, it is possible to provide optimal mentalstate information for each user of a terminal.

FIG. 5 is a diagram illustrating a method of determining a user's mentalstate. An example of a method, which determines a user's mental stateusing the apparatus 100 of FIG. 1 for determining the user's mentalstate, will now be described in detail with reference to FIG. 5. Theoperations in FIG. 5 may be performed in the sequence and manner asshown, although the order of some operations may be changed or some ofthe operations omitted without departing from the spirit and scope ofthe illustrative examples described. Many of the operations shown inFIG. 5 may be performed in parallel or concurrently. The description ofFIGS. 1-4 is also applicable to FIG. 5, and thus will not be repeatedhere.

In 301, the apparatus 100 collects sensor data that are generated when auser inputs text using a terminal. In 302, the apparatus 100 extractsfeature data, used for analyzing the user's mental state, from thecollected sensor data. In 303, when feature data are extracted, theapparatus 100 may determine whether to generate learning data. Forexample, if the feature data are extracted, the apparatus 100 maydetermine that learning data is to be generated when a predeterminedreference (for example, when the number of stored learning data is equalto or less than a certain value) is satisfied or when the apparatus 100asks the user about whether to generate the learning data and the userrequests generation of the learning data.

In 304, when it is determined that learning data is to be generated, theapparatus 100 may generate learning data with the extracted featuredata. As described above, the apparatus 100 may ask the user about amental state as to the extracted feature data or feature data remainingafter noise is removed from the extracted feature data, andindex-process a mental state, input by the user, in the feature data togenerate learning data. As described above, the apparatus 100 may selectat least some feature data from among the extracted feature data or thefeature data remaining after a noise is removed from the extractedfeature data, based on significances, and may generate learning data forthe selected feature data.

When learning data are generated, the apparatus 100 may return tooperation 301. This may happen, for example, where the number ofgenerated learning data is equal to or less than a predeterminedreference value. As another example, if the user does not respond to aninference model building request, the apparatus 100 may determine thatthe generated learning data are not yet sufficient to build theinference model and again collect the sensor data. In 305, when thenumber of generated learning data is greater than the predeterminedreference value or the user's request is input, the apparatus 100 maybuild the inference model with the learning data and learn the inferencemodel.

In 306, the apparatus 100 may apply the feature data to the builtinference model to determine the user's mental state.

In 307, when the mental state is determined, as described above, theapparatus 100 may take an appropriate measure depending on the mentalstate. When a truth result of the determined mental state is true, theapparatus 100 may index-process the determined mental state and theextracted feature data to update learning data.

FIG. 6 is a diagram illustrating a method of determining a user's mentalstate. The operations in FIG. 6 may be performed in the sequence andmanner as shown, although the order of some operations may be changed orsome of the operations omitted without departing from the spirit andscope of the illustrative examples described. Many of the operationsshown in FIG. 6 may be performed in parallel or concurrently. Thedescription of FIGS. 1-4 is also applicable to FIG. 5, and thus will notbe repeated here.

Another example of the method, which determines a user's mental stateusing the apparatus 100 of FIG. 1 for determining the user's mentalstate, will now be described in detail with reference to FIG. 6. When auser inputs a text to a terminal, in 401, the apparatus 100 may extracta text input speed. In 402, the apparatus 100 may apply the text inputspeed to an inference model to determine the user's mental state. Thetext input speed may change depending on the user's emotion state andthe apparatus 100 may determine the user's mental state expressed by theextracted text input speed. In addition to the text input speed, theapparatus 100 may extract other information, which is generated when theuser inputs text and the apparatus 100 may apply the other informationto the inference model to determine the user's mental state. The otherinformation may be one or more of the types of information identifiedabove.

When the user's mental state is determined, in 403, the apparatus 100may take a predetermined measure based on the determined mental state.The predetermined measure, as described above, may include, but is notlimited to, informing a user itself, an acquaintance, a medical team, orthe like of information on the current mental state of the user,providing statistic information on accumulated mental states,automatically changing the user interface theme of the terminaldepending on the user's mental state, recommend contents appropriate forthe user's mental state, or display a response measure appropriate forthe user's current mental state, etc.

The methods described above can be written as a computer program, apiece of code, an instruction, or some combination thereof, forindependently or collectively instructing or configuring the processingdevice to operate as desired. Software and data may be embodiedpermanently or temporarily in any type of machine, component, physicalor virtual equipment, computer storage medium or device that is capableof providing instructions or data to or being interpreted by theprocessing device. The software also may be distributed over networkcoupled computer systems so that the software is stored and executed ina distributed fashion. In particular, the software and data may bestored by one or more non-transitory computer readable recordingmediums. The non-transitory computer readable recording medium mayinclude any data storage device that can store data that can bethereafter read by a computer system or processing device. Examples ofthe non-transitory computer readable recording medium include read-onlymemory (ROM), random-access memory (RAM), Compact Disc Read-only Memory(CD-ROMs), magnetic tapes, USBs, floppy disks, hard disks, opticalrecording media (e.g., CD-ROMs, or DVDs), and PC interfaces (e.g., PCI,PCI-express, WiFi, etc.). In addition, functional programs, codes, andcode segments for accomplishing the example disclosed herein can beconstrued by programmers skilled in the art based on the flow diagramsand block diagrams of the figures and their corresponding descriptionsas provided herein.

The apparatuses described herein may be implemented using hardwarecomponents. The hardware components may include, for example,controllers, sensors, processors, generators, drivers, and otherequivalent electronic components. The hardware components may beimplemented using one or more general-purpose or special purposecomputers, such as, for example, a processor, a controller and anarithmetic logic unit, a digital signal processor, a microcomputer, afield programmable array, a programmable logic unit, a microprocessor orany other device capable of responding to and executing instructions ina defined manner. The hardware components may run an operating system(OS) and one or more software applications that run on the OS. Thehardware components also may access, store, manipulate, process, andcreate data in response to execution of the software. For purpose ofsimplicity, the description of a processing device is used as singular;however, one skilled in the art will appreciated that a processingdevice may include multiple processing elements and multiple types ofprocessing elements. For example, a hardware component may includemultiple processors or a processor and a controller. In addition,different processing configurations are possible, such a parallelprocessors.

A number of examples have been described above. Nevertheless, it will beunderstood that various modifications may be made. For example, suitableresults may be achieved if the described techniques are performed in adifferent order and/or if components in a described system,architecture, device, or circuit are combined in a different mannerand/or replaced or supplemented by other components or theirequivalents. Accordingly, other implementations are within the scope ofthe following claims.

What is claimed is:
 1. An apparatus for determining a user's mentalstate, comprising: a data collector configured to collect sensor data; adata processor configured to extract feature data from the sensor data;and a mental state determiner configured to provide the feature data toan inference model to determine the user's mental state.
 2. Theapparatus of claim 1, wherein the sensor data are measured through oneor more of a touch screen, an accelerometer sensor, a gyroscope sensor,a magnetometer sensor, an orientation sensor, a global positioningsystem (GPS), a barometer sensor, a fingerprint sensor, an illuminancesensor, a microphone, and a software sensorin a terminal.
 3. Theapparatus of claim 2, wherein the feature data comprises text inputinformation and context information; and the text input informationcomprises one or more of keyboard input information, writing inputinformation, and terminal state information, and the context informationcomprises one or more of a location, weather, a discomfort index, atime, and an average illuminance.
 4. The apparatus of claim 1, furthercomprising: a learning data generator configured to determine whether togenerate learning data when feature data is extracted and to generatelearning data with the feature data; and the mental state determiner isfurther configured to build the inference model with the learning data.5. The apparatus of claim 4, wherein the learning data generator isconfigured to select at least one feature data from the extractedfeature data, to ask the user about a mental state, and to generatelearning data based on the user's response.
 6. The apparatus of claim 5,wherein the learning data generator is configured to calculatesignificances of the extracted feature data and to select the at leastone feature data on the basis of the significances.
 7. The apparatus ofclaim 6, wherein the significances of the extracted feature data iscalculated using algorithms comprising an information gain algorithm, achi-squared distribution algorithm, and a mutual information algorithm.8. The apparatus of claim 5, further comprising a learning databaseconfigured to store the learning data.
 9. The apparatus of claim 1,wherein, the mental state comprises at least one of an emotion, afeeling, or a stress, and each mental state comprises one or more lowerlevels.
 10. The apparatus of claim 1, wherein the mental statedeterminer is further configured to provide the feature data to theinference model with a supervised learning algorithm, the supervisedlearning algorithm comprising a decision tree algorithm and a naiveBayes classification algorithm.
 11. The apparatus of claim 1, furthercomprising a measure executor configured to take a predeterminedmeasures based on the determined mental state.
 12. The apparatus ofclaim 11, wherein the predetermined measure comprises providinginformation on the determined mental state of the user, controlling auser interface of the terminal based on the user's mental state,recommending content based on the mental state of the user, and updatinglearning data with the mental state of the user.
 13. The apparatus ofclaim 11, further comprising a measure database configured to store thepredetermined measures.
 14. The apparatus of claim 11, wherein themeasure executor is installed as an interactive software agent that isconfigured to provide a conversational interface.
 15. The apparatus ofclaim 1, further comprising an authenticator configured to authenticatethe user at the terminal.
 16. The apparatus of claim 15, wherein theuser is authenticated based on at least one of logon information,fingerprint, or biometric information.
 17. A method of determining auser's mental state, comprising: collecting sensor data which aregenerated when a user inputs text using a terminal; extracting, at adata processor, feature data from the sensor data; and applying thefeature data to a built inference model to determine the user's mentalstate.
 18. The method of claim 17, wherein the sensor data are measuredthrough one or more of a touch screen, an accelerometer sensor, agyroscope sensor, a magnetometer sensor, an orientation sensor, a globalpositioning system (GPS), a barometer sensor, a fingerprint sensor, anilluminance sensor, a microphone, and a software sensor.
 19. The methodof claim 17, wherein the feature data comprises text input informationand context information; and the text input information comprises one ormore of keyboard input information, writing input information, andterminal state information, and the context information comprises one ormore of a location, weather, a discomfort index, a time, information onrecipient of the text, and an average illuminance.
 20. The method ofclaim 17, further comprising: determining, when feature data isextracted, whether to generate learning data; generating learning datawith the feature data when learning data is to be generated; andbuilding the inference model with the learning data.
 21. The method ofclaim 20, wherein the generating of learning data comprises: selectingat least one feature data from the extracted feature data; asking theuser about a mental state; and generating learning data on the basis ofthe user's response.
 22. The method of claim 21, wherein the selectingof at least one feature data comprises calculating significances of theextracted feature data, and selecting the at least one feature data onthe basis of the significances.
 23. The method of claim 22, whereinsignificances of the extracted feature data is calculated usingalgorithms comprising an information gain algorithm, a chi-squareddistribution algorithm, and a mutual information algorithm.
 24. Themethod of claim 20, wherein, the mental state comprises at least one ofan emotion, a feeling, or a stress, and each mental stats comprises oneor more lower levels.
 25. The method of claim 17, wherein thedetermining of the user's mental state comprises applying the featuredata to the inference model with a supervised learning algorithm, thesupervised learning algorithm comprising a decision tree algorithm and anaive Bayes classification algorithm.
 26. The method of claim 17,further comprising undertaking a predetermined measure based on thedetermined mental state.
 27. The method of claim 26, wherein thepredetermined measure comprises providing information on the determinedmental state, controlling a user interface of the terminal on the basisof the mental state, recommending content based on the mental state ofthe user, and updating learning data with the determined result of themental state.
 28. A method of determining a user's mental state,comprising: extracting a speed at which a user inputs text to aterminal; applying the text input speed to an inference model todetermine the user's mental state; and taking a predetermined measure onthe basis of the determined mental state.
 29. The method of claim 28,further comprising extracting other information, which is generated whenthe user is inputting the text and applying the other information to theinference model.
 30. The method of claim 29, wherein the otherinformation comprises location information of the terminal.
 31. Themethod of claim 29, wherein the other information comprises weatherinformation.
 32. The method of claim 29, wherein the other informationcomprises state information of the terminal.
 33. The method of claim 29,wherein the other information comprises number of shakings of theterminal.
 34. A method of determining a user's mental state, comprising:collecting sensor data which are generated when a user inputs text usinga terminal; extracting, at a data processor, feature data from the userinput data; determining whether learning data is to be generated; andapplying the feature data to a built inference model to determine theuser's mental state.
 35. The method of claim 34, wherein determiningwhether learning data is to be generated comprises verifying whether afirst predetermined reference is satisfied or receiving a request fromthe user to generate the learning data.
 36. The method of claim 35,further comprising: when learning data is to be generated, generatinglearning data with the feature data; confirming whether the learningdata exceeds a second predetermined reference; and building theinference model with the learning data, when the learning data exceedsthe second predetermined reference.
 37. The method of claim 36, furthercomprising updating the inference model with the user's response on thedetermined mental state.